/* eslint-disable spaced-comment */
import Vue from 'vue'
import Router from 'vue-router'
import Foo from '../components/Foo'
import Bar from '../components/Bar'
import Index from '../page/index/Index'
import HelloWorld from '@/components/HelloWorld'
import Directivte from '@/components/01/Directivte'

Vue.use(Router)

/* 路由规则 */
export default new Router({
  routes: [
    /* 匹配到的就渲染进去 */
    {
      path: '/',
      name: 'Hello',
      component: HelloWorld
    },
    /* 匹配到的路由规则 */
    { path: '/foo', component: Foo },
    { path: '/bar', component: Bar },
    { path: '/directivte', component: Directivte },
    { path: '/index', component: Index }
  ]
})
